linux 常规网络配置
主机名设置
[root@localhost ~]# vi /etc/sysconfig/network
NETWORKING=yes
NETWORKING_IPV6=yes
HOSTNAME=red1
GATEWAY=10.3.37.1
查看主机名
[root@localhost ~]# hostname
localhost.red1
使用ipconfig 配置IP及辅助IP
[root@localhost ~]# ifconfig
eth0 Link encap:Ethernet HWaddr 00:0C:29:9A:A7:44
inet addr:10.3.37.30 Bcast:10.3.37.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fe9a:a744/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:69301 errors:0 dropped:0 overruns:0 frame:0
TX packets:817 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:6539421 (6.2 MiB) TX bytes:122965 (120.0 KiB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:29358 errors:0 dropped:0 overruns:0 frame:0
TX packets:29358 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:27503811 (26.2 MiB) TX bytes:27503811 (26.2 MiB)
peth0 Link encap:Ethernet HWaddr FE:FF:FF:FF:FF:FF
inet6 addr: fe80::fcff:ffff:feff:ffff/64 Scope:Link
UP BROADCAST RUNNING NOARP MTU:1500 Metric:1
RX packets:128574 errors:0 dropped:0 overruns:0 frame:0
TX packets:872 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:15894159 (15.1 MiB) TX bytes:132803 (129.6 KiB)
Interrupt:18 Base address:0x2000
vif0.0 Link encap:Ethernet HWaddr FE:FF:FF:FF:FF:FF
inet6 addr: fe80::fcff:ffff:feff:ffff/64 Scope:Link
UP BROADCAST RUNNING NOARP MTU:1500 Metric:1
RX packets:843 errors:0 dropped:0 overruns:0 frame:0
TX packets:69326 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:127005 (124.0 KiB) TX bytes:6541353 (6.2 MiB)
xenbr0 Link encap:Ethernet HWaddr FE:FF:FF:FF:FF:FF
UP BROADCAST RUNNING NOARP MTU:1500 Metric:1
RX packets:67878 errors:0 dropped:0 overruns:0 frame:0
&nbs