[root@client1 ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth1
DEVICE="eth1"
ONBOOT=yes
TYPE=Ethernet
BOOTPROTO=none
IPADDR=192.168.122.3
PREFIX=24
GATEWAY=192.168.122.1
NAME="System eth1"
[root@client1 ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth1:1
DEVICE="eth1:1"
ONBOOT=yes
TYPE=Ethernet
BOOTPROTO=none
IPADDR=192.168.122.30
PREFIX=24
GATEWAY=192.168.122.1
Once the virtual network interface file is setup correctly, then either restart system or use "service network restart" or use "ifup eth1:1" (whatever suitable & feasible - depends case to case) to bring virtual interface up. It will show up as follows:
[root@client1 ~]# ifconfig -a
eth1 Link encap:Ethernet HWaddr 52:54:00:18:FB:B0
inet addr:192.168.122.3 Bcast:192.168.122.255 Mask:255.255.255.0
inet6 addr: fe80::5054:ff:fe18:fbb0/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:302 errors:0 dropped:0 overruns:0 frame:0
TX packets:231 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:24975 (24.3 KiB) TX bytes:33754 (32.9 KiB)
Interrupt:11 Base address:0x6000
eth1:1 Link encap:Ethernet HWaddr 52:54:00:18:FB:B0
inet addr:192.168.122.30 Bcast:192.168.122.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:11 Base address:0x6000
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:16 errors:0 dropped:0 overruns:0 frame:0
TX packets:16 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:960 (960.0 b) TX bytes:960 (960.0 b)
No comments:
Post a Comment