Differences

This shows you the differences between two versions of the page.

Link to this comparison view

rb:centosnetwork [07/09/2018 19:40] (current)
andrew created
Line 1: Line 1:
 +====== Centos Networking ======
 +
 + ​====== Centos Network interfaces examples ======
 +
 +===== Static =====
 +
 +<​code>​
 +[root@hydrogen]#​ cat /​etc/​sysconfig/​network-scripts/​ifcfg-eth0 ​
 +DEVICE="​eth0"​
 +BOOTPROTO="​none"​
 +HWADDR="​52:​54:​00:​5B:​C7:​10"​
 +ONBOOT="​yes"​
 +IPADDR=192.168.5.24
 +NETMASK=255.255.255.0
 +DEFROUTE=yes
 +[root@hydrogen]# ​
 +</​code>​
 +
 +<​code>​
 +$ cat /​etc/​sysconfig/​network
 +HOSTNAME=server.name.pri
 +NETWORKING=yes
 +NETWORKING_IPV6=yes
 +GATEWAY=192.168.1.10
 +</​code>​
 +
 +<​code>​
 +$ cat /​etc/​resolv.conf ​
 +search mydomain.co.uk mydomain.pri
 +nameserver 192.168.1.1
 +</​code>​
 +
 +===== DHCP =====
 +
 +<​code>​
 +DEVICE="​eth0"​
 +BOOTPROTO="​dhcp"​
 +ONBOOT=yes
 +</​code>​
 +
 +
 +===== Bonding =====
 +
 +<​code>​
 +$ cat /​etc/​sysconfig/​network-scripts/​ifcfg-eth[0-1]
 +DEVICE="​eth0"​
 +HWADDR="​50:​E5:​49:​1D:​75:​B1"​
 +NM_CONTROLLED="​no"​
 +ONBOOT="​yes"​
 +BOOTPROTO=none
 +
 +MASTER=bond0
 +SLAVE=yes
 +USERCTL=no
 +
 +
 +
 +
 +DEVICE="​eth1"​
 +HWADDR="​00:​10:​18:​27:​62:​98"​
 +NM_CONTROLLED="​no"​
 +ONBOOT="​yes"​
 +BOOTPROTO=none
 +MASTER=bond0
 +SLAVE=yes
 +USERCTL=no
 +</​code>​
 +
 +<​code>​
 +$ cat /​etc/​sysconfig/​network-scripts/​ifcfg-bond0 ​
 +DEVICE=bond0
 +IPADDR=192.168.1.1
 +NETMASK=255.255.255.0
 +GATEWAY=192.168.1.1
 +ONBOOT=yes
 +BOOTPROTO=none
 +USERCTL=no
 +</​code>​
 +
 +<​code>​
 +$ cat /​etc/​sysconfig/​network
 +HOSTNAME=server.name.pri
 +NETWORKING=yes
 +NETWORKING_IPV6=yes
 +GATEWAY=192.168.1.10
 +</​code>​
 +
 +===== VLAN driver =====
 +
 +This requires the 802.1q module to talk to the Cisco switch:-
 +
 +  # modprobe 8021q
 +
 +
 +Not tested.
 +
 +
 +
 +
 +===== Bonding with VLAN driver and bridging =====
 +
 +No specific switch config is required for this, but the switch ports need to be trunks not access ports.
 +
 +Not tested.
  

rb/centosnetwork.txt ยท Last modified: 07/09/2018 19:40 by andrew