This is the blog, how to add together novel network interface inwards Hyper - V Centos 6.4 Virtual Machine.
For a System Administrator, It is a common task which is required on need to add together additional Network Interface. It may hold upwards required for dissimilar utilization i.e. Setup Bridge Interface, Setting upwards VLAN etc.
1 - Requirement :-In my scenario, I am using Centos release 6.4 (Final) Virtual Machine running on Hyper -V.
2 - Check Current Interfaces :-
We tin cheque electrical current available Network interfaces using below method.
A- Using dominance ifconfig -a
[root@testsvn ]# ifconfig -a eth0 Link encap:Ethernet HWaddr 00:15:5D:01:6B:00 inet addr:10.0.0.88 Bcast:10.0.1.255 Mask:255.255.254.0 inet6 addr: fe80::215:5dff:fe01:6b00/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:8710 errors:0 dropped:0 overruns:0 frame:0 TX packets:345 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:1049224 (1.0 MiB) TX bytes:53714 (52.4 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: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:800 (800.0 b) TX bytes:800 (800.0 b)
B- Using dominance ip link
[root@testsvn ]# ip link 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue dry soil UNKNOWN link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast dry soil UP qlen K link/ether 00:15:5d:01:6b:00 brd ff:ff:ff:ff:ff:ff [root@testsvn ]#
3- Now Add novel network interface from Hyper - V Console VM Setting.
- Shutdown your VM first
Right Click on (1) VM Go to VM (2) setting
- Select (1) Add Hardware from left Action Menu, Choose (2) Network Adapter inwards the Hardware bill of fare list, Click on (3) Add button
Now (1) New network adapter will hold upwards displayed inwards left side menu, Select (2) required Virtual Switch, (3) Apply too (4) OK.
Start Virtual Machine afterwards applied higher upwards setting.
4- Check newly added interface :-
[root@testsvn ]# ifconfig -a eth0 Link encap:Ethernet HWaddr 00:15:5D:01:6B:00 inet addr:10.0.0.88 Bcast:10.0.1.255 Mask:255.255.254.0 inet6 addr: fe80::215:5dff:fe01:6b00/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:4330 errors:0 dropped:0 overruns:0 frame:0 TX packets:269 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:489297 (477.8 KiB) TX bytes:43043 (42.0 KiB) eth1 Link encap:Ethernet HWaddr 00:15:5D:01:6B:04 BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:3672 errors:0 dropped:0 overruns:0 frame:0 TX packets:19 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:406333 (396.8 KiB) TX bytes:1898 (1.8 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:6 errors:0 dropped:0 overruns:0 frame:0 TX packets:6 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:300 (300.0 b) TX bytes:300 (300.0 b)
Newly available interface is eth1
5- Let's configure eth1 interface too activate this adapter:-
please brand a complaint eth1 interface MAC address, inwards higher upwards event y'all tin run across MAC ID 00:15:5D:01:6B:04
Now practise a file ifcfg-eth1 nether this path :/etc/sysconfig/network-scripts/ifcfg-eth1
and append below line
[root@testsvn ]# vi /etc/sysconfig/network-scripts/ifcfg-eth1
DEVICE=eth1 HWADDR=00:15:5D:01:6B:04 TYPE=Ethernet UUID=d506b5c8-bc15-477e-9575-d6190f8304c7 ONBOOT=yes NM_CONTROLLED=yes BOOTPROTO=dhcp
Save and Exit from File.
6- Restart Networking service to utilize changes :
[root@testsvn ]# service network restart
7- Let's cheque for IP address :-
Use dominance ifconfig or ip addr to cheque assigned IP address.
[root@testsvn ]# ifconfig eth0 Link encap:Ethernet HWaddr 00:15:5D:01:6B:00 inet addr:10.0.0.88 Bcast:10.0.1.255 Mask:255.255.254.0 inet6 addr: fe80::215:5dff:fe01:6b00/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:37772 errors:0 dropped:0 overruns:0 frame:0 TX packets:435 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:4249694 (4.0 MiB) TX bytes:80131 (78.2 KiB) eth1 Link encap:Ethernet HWaddr 00:15:5D:01:6B:04 inet addr:10.0.0.127 Bcast:10.0.1.255 Mask:255.255.254.0 inet6 addr: fe80::215:5dff:fe01:6b04/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:5225 errors:0 dropped:0 overruns:0 frame:0 TX packets:28 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:580183 (566.5 KiB) TX bytes:2792 (2.7 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:38 errors:0 dropped:0 overruns:0 frame:0 TX packets:38 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:1900 (1.8 KiB) TX bytes:1900 (1.8 KiB)
We accept successfully added newly Interface too getting IP address from DHCP Server.
That's All
!!!Cheers!!!
Tidak ada komentar:
Posting Komentar