It can't be throw over gateway using bonding on CentOS 6 - linux

I'll try to bonding(NIC RAID) on CentOS6.
(It can meet preconditions to connect the Internet with eachother NICs.)
I set some parameters in some files, which are "/etc/modprobe.d/bonding.conf",
"/etc/sysconfig/network-scripts/ifcfg-bond0","/etc/sysconfig/network-scripts/ifcfg-eth0",
"/etc/sysconfig/network-scripts/ifcfg-eth1", ..., and "/etc/sysconfig/network-scripts/ifcfg-eth3".
In "/etc/modprobe.d/bonding.conf" is
alias bond0 bonding
options bonding mode=1 miimon=200 primary=eth0
In "/etc/sysconfig/network-scripts/ifcfg-bond0" is
DEVICE=bond0
IPADDR=192.168.1.xxx
NETMASK=255.255.255.0
NETWORK=192.168.1.0
BROADCAST=192.168.1.255
DNS1=xxx.xxx.xxx.1
ONBOOT=yes
TYPE=Ethernet
BOOTPROTO=static
USERCTL=no
PEERDNS=no
In "/etc/sysconfig/network-scripts/ifcfg-eth1" is
DEVICE=eth0
ONBOOT=yes
TYPE=Ethernet
MASTER=bond0
SLAVE=yes
BOOTPROTO=static
HADDR=xx:xx:xx:xx
DNS1=xxx.xxx.xxx.1
I set same parameters "/.../ifcfg-eth1", "/.../ifcfg-eth2" and "/.../ifcfg-eth3" except of "DEVICE"and HADDR.
After I restert network devices with "service network restart".
then show in display "Devide not Managed by NetworkManager". so I did reboot the machine.
As I check them with some operations.
I input "ifconfig -a", the result is normal.
I input "ping xxx.xxx.1.1(Gateway server IP Address), the result is
normal.
I input "ping 216.239.27.104(the IP Address is Google's server)",
the result is Error.(DNS wasn't system down then)
I input "ping google.com", the result is Error.
I input "dig", the result is normal(DNS server's IP Address was
showed)
I seem this problem coase by Gateway's IP Address, But I don't know the way how to.
And my solution is speculation.
Please tell me how to do for resolve this problem.

It sounds like you have a server where the GUI is installed. I believe NetworkManager is hijacking.
yum list | grep -i networkmanager
See if it's installed, you can try stopping the process or removing it if not using GUI. Have had similar issue.

Related

Why might my wget install of wordpress be failing?

I'm on CentOS 7. I'm running this command:
wget http://wordpress.org/latest.tar.gz
This is the returned output:
--2016-09-08 15:53:04-- http://wordpress.org/latest.tar.gz
Resolving wordpress.org (wordpress.org)... 66.155.40.250, 66.155.40.249
Connecting to wordpress.org (wordpress.org)|66.155.40.250|:80... failed: Network is unreachable.
Connecting to wordpress.org (wordpress.org)|66.155.40.249|:80... failed: Network is unreachable.
I'm not sure why that might be. I have access to my local network from my machine; I can install yum packages without issue.
EDIT
Result of ip route get 66.155.40.249
RTNETLINK answers: Network is unreachable
My /etc/sysconfig/network-scripts/ifcfg-eno16777736 after I edited it:
TYPE=Ethernet
BOOTPROTO="static"
IPADDR=192.168.2.100
NETMASK=255.255.255.0
NM_CONTROLLED=no
DEFROUTE=yes
PEERDNS=yes
PEERROUTES=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_PEERDNS=yes
IPV6_PEERROUTES=yes
IPV6_FAILURE_FATAL=no
NAME=eno16777736
UUID=*random*
DEVICE=eno16777736
ONBOOT=yes
With the exception of my UUID... Specifically I added: bootproto, ipadder, netmask, and nm_controlled.
This situation happens when no entry in the routing table has been found.
If you're using a laptop (with wifi and ethernet) this may happen if you dhclient -r from one interface, which can remove the default route.
Easy resolution:
make a new dhcp request (optionally release the current lease)
add the default route by hand: ip route add default via <<GW ip>>. If you have several interfaces, you may need to specify the output interface using ip route add default via <<GW ip>> dev <<devname>> instead.

not able to find ifcfg-enp0s3 in /etc/sysconfig/network-scripts?

i want to change the IP Address of my centos7 vm which i have created in virtual box. im able to see the nic cards if i do "ifcfg". but when i go to the path /etc/sysconfig/network-scripts the nic cards are not available. can anyone help me how to change the ip in centos7. i even tried with command "setup"
Create ifcfg-enp0s3 and ifcfg-enp0s8 files manually. The samples are /usr/share/doc/initscripts-*/examples/networking/. However if you use static IP address, essential items are here:
TYPE=Ethernet
BOOTPROTO=none
NAME=enp0s3
DEVICE=enp0s3
ONBOOT=yes
IPADDR=192.168.100.3
NETMASK=255.255.255.0
Or if you prefer to use DHCP :
TYPE=Ethernet
BOOTPROTO=dhcp
NAME=enp0s3
DEVICE=enp0s3
ONBOOT=yes

Linux Debian SSH connection to another machine has delay after network settings change

Hi StackOverflow members,
I have an issue with ssh connection on my Debian 7 system to a remote OpenSSH server located on the same network. It looks like there is some network configuration problem but I cann't find where it lays. This two debian machines are connect with a switch that is NOT connected to a router. So the two machines have no internet connection.
A-Debian 7
IP: 192.168.1.2
MASK: 255.255.255.0
GW: 192.168.1.1
B-Debian 7
IP: 192.168.1.3
MASK: 255.255.255.0
GW: 192.168.1.1
With that configuration the ssh command prompts my for a password in less then a second. But the with the following network configuration I get the password prompt after a 10+ second delay:
A-Debian 7
IP: 10.10.1.83
MASK: 255.255.255.128
GW: 10.10.1.1
B-Debian 7
IP: 10.10.1.82
MASK: 255.255.255.128
GW: 10.10.1.1
The ssh connection from the server A -> B runs with both configs on custom 1111 port.
The B machine has also a Web server running on port 8080 that has no delays with both net configurations.
Thank you in advance for any clues or tips how to solve that problem.
SOLVED: Removing of the gateway parameter "GW: 10.10.1.1" in the network settings has solved the problem.
The usual culprits here are IPv6 and DNS lookups.
SSH might try to connect via IPv6, first, but the timeout is too low for that. You can see whether IPv6 is enabled with
cat /proc/sys/net/ipv6/conf/eth0/disable_ipv6
To disable:
echo 1 > /proc/sys/net/ipv6/conf/eth0/disable_ipv6
The second culprit is DNS; my guess is that DNS lookups don't work correctly with the second configuration. Try host www.google.com to test this theory.
If that also has a delay, you need to fix your DNS setup.
If that's not it, check the rest of your networking parameters: Gateway, cables, etc.
Start to ping the other host. Is that fast & reliable?
Next, try remote login (ssh, telnet). Note that you can give telnet a port to connect to, so if you have DB server running, you can still use telnet to connect to the server. It will print an error but it allows you to test the TCP/IP connection without any extra error sources.

cannot SSH beaglebone after changing

In order to get internet through USB from my ubuntu host, I changed routing on beaglebone
route add default gw 192.168.7.1
and change /etc/resolv.conf into
nameserver 192.168.1.1
It gets internet but I cannot ssh beaglebone like before anymore from any host.
Normally I did ssh root#192.168.7.2
but it doesn't return any message or prompt to enter password.Just blank waits there.
I there any way to fix it?
Are you sure that you shouldn't configure /etc/resolv.conf with
nameserver 192.168.7.1
It my happen that the ssh daemon is trying to resolve the reverse of the ip address you're connecting from, and it takes long to timeout, giving you the impression that it does not work.

Xen configure host-only adapter

Xen hypervisor has 2 modes for network configuration as I've seen in Virtual Manager. 1 NAT 2 Routed. Both ask for IP Subnet. However i want to configure a network where i could assign any IP instead of being assigned by DHCP of Xen.
I've use oracle Virtual Box there is an option to use Host-only adapter. I want to use Xen in that way.
In other words i want to share physical network interface to guest machine(VM)
I'm using Xen Hypervisor 3.x on CentOS 6.2 x86_64
I did the following to solve the issue this worked for me.
Disabling Xen's network scripts
If using Xen it is recommended to disable its network munging by editing /etc/xen/xend-config.sxp and changing the line
(network-script network-bridge)
To be
(network-script /bin/true)
Disabling NetworkManager
As of the time of writing (Fedora 12), NetworkManager still does not support bridging, so it is necessary to use "classic" network initscripts for the bridge, and to explicitly mark them as independent from NetworkManager (the "NM_CONTROLLED=no" lines in the scripts below).
If desired, you can also completely disable the NetworkManager:
# chkconfig NetworkManager off
# chkconfig network on
# service NetworkManager stop
# service network start
Creating network initscripts
In the /etc/sysconfig/network-scripts directory it is neccessary to create 2 config files. The first (ifcfg-eth0) defines your physical network interface, and says that it will be part of a bridge:
# cat > ifcfg-eth0 <<EOF
DEVICE=eth0
HWADDR=00:16:76:D6:C9:45
ONBOOT=yes
BRIDGE=br0
NM_CONTROLLED=no
EOF
Obviously change the HWADDR to match your actual NIC's address. You may also wish to configure the device's MTU here using e.g. MTU=9000.
The second config file (ifcfg-br0) defines the bridge device:
# cat > ifcfg-br0 <<EOF
DEVICE=br0
TYPE=Bridge
BOOTPROTO=dhcp
ONBOOT=yes
DELAY=0
NM_CONTROLLED=no
EOF
WARNING: The line TYPE=Bridge is case-sensitive - it must have uppercase 'B' and lower case 'ridge'
After changing this restart networking (or simply reboot)
# service network restart
Visit for more details
For Xen, this is just a special case of bridged networking.
You create a dummy bridge on your CentOS Dom0, then connect your VM to that bridge.
From the CentOS Documention (http://www.centos.org/docs/5/html/5.2/Virtualization/sect-Virtualization-Virtualized_network_devices-Laptop_network_configuration.html)
create a dummy0 network interface and assign it a static IP address.
In our example I selected 10.1.1.1 to avoid routing problems in our environment. To enable dummy device support add the following lines to /etc/modprobe.conf
alias dummy0 dummy
options dummy numdummies=1
To configure networking for dummy0 edit/create /etc/sysconfig/network-scripts/ifcfg-dummy0:
DEVICE=dummy0
BOOTPROTO=none
ONBOOT=yes
USERCTL=no
IPV6INIT=no
PEERDNS=yes
TYPE=Ethernet
NETMASK=255.255.255.0
IPADDR=10.1.1.1
ARP=yes
You can then just connect your VM to the dummy0 bridge device
Additional Reference
http://wiki.xen.org/wiki/HostConfiguration/Networking

Resources