Minggu, 31 Juli 2016

How To Add Together Novel Network Adapter Inward Linux Ubuntu 16.04

This is the blog, how to add together novel network interface inwards Linux Ubuntu 16.04 TLS.

For a System Administrator, It is a common task which is required on need to add together additional Network Interface. It may last required for unlike operate i.e. Setup Bridge Interface, Setting upwards VLAN etc.


1 - Requirement :- In my scenario, I am using Ubuntu 16.04 TLS box running on the Virtual box.



2 - Check Current Interfaces :-

We tin cheque electrical current available Network interfaces using below method.

A- Using ascendency ifconfig -a

root@U16: # ifconfig -a enp0s3    Link encap:Ethernet  HWaddr 08:00:27:ae:86:3c           inet addr:10.0.0.161  Bcast:10.0.1.255  Mask:255.255.254.0           inet6 addr: fe80::a00:27ff:feae:863c/64 Scope:Link           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1           RX packets:1906 errors:0 dropped:0 overruns:0 frame:0           TX packets:894 errors:0 dropped:0 overruns:0 carrier:0           collisions:0 txqueuelen:1000           RX bytes:1646594 (1.6 MB)  TX bytes:73845 (73.8 KB)  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:65536  Metric:1           RX packets:160 errors:0 dropped:0 overruns:0 frame:0           TX packets:160 errors:0 dropped:0 overruns:0 carrier:0           collisions:0 txqueuelen:1           RX bytes:11840 (11.8 KB)  TX bytes:11840 (11.8 KB) 

B- Using ascendency ip link


root@U16: # ip link 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue lay down UNKNOWN means DEFAULT grouping default qlen i     link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 2: enp0s3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast lay down UP means DEFAULT grouping default qlen grand     link/ether 08:00:27:ae:86:3c brd ff:ff:ff:ff:ff:ff root@U16: # 


3- Now Add novel network interface from Virtual Box.

- Shutdown your VM first

- Select (1) VM Go to VM (2) setting  



- Select (1) Network from left side menu, Choose (2) Network adapter 2 , conduct cheque box (3) enable network Adapter and Select (4) Bridge Adapter from driblet downwards list Attached to option.


- Click Ok  And Start the VM.

4- Check newly added interface :-

root@U16: # ifconfig -a enp0s3    Link encap:Ethernet  HWaddr 08:00:27:ae:86:3c           inet addr:10.0.0.161  Bcast:10.0.1.255  Mask:255.255.254.0           inet6 addr: fe80::a00:27ff:feae:863c/64 Scope:Link           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1           RX packets:723 errors:0 dropped:0 overruns:0 frame:0           TX packets:114 errors:0 dropped:0 overruns:0 carrier:0           collisions:0 txqueuelen:1000           RX bytes:67371 (67.3 KB)  TX bytes:16991 (16.9 KB)  enp0s8    Link encap:Ethernet  HWaddr 08:00:27:98:ec:88           BROADCAST MULTICAST  MTU:1500  Metric:1           RX packets:0 errors:0 dropped:0 overruns:0 frame:0           TX packets:0 errors:0 dropped:0 overruns:0 carrier:0           collisions:0 txqueuelen:1000           RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)  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:65536  Metric:1           RX packets:160 errors:0 dropped:0 overruns:0 frame:0           TX packets:160 errors:0 dropped:0 overruns:0 carrier:0           collisions:0 txqueuelen:1           RX bytes:11840 (11.8 KB)  TX bytes:11840 (11.8 KB) 


Newly available interface is enp0s8



5- Let's configure enp0s8 interface as well as activate this adapter:-

Open interfaces from /etc/network location using vi editor. And append below line.

auto enp0s8
iface enp0s8 inet dhcp

root@U16: # vi /etc/network/interfaces  auto enp0s8 iface enp0s8 inet dhcp  

Save and Exit form file.


6- Restart Networking service to utilize changes :-

root@U16: # service networking restart


7- Let's cheque for IP address :-

Use ascendency ifconfig or ip addr to cheque assigned IP address.

root@U16: # ifconfig enp0s3    Link encap:Ethernet  HWaddr 08:00:27:ae:86:3c           inet addr:10.0.0.161  Bcast:10.0.1.255  Mask:255.255.254.0           inet6 addr: fe80::a00:27ff:feae:863c/64 Scope:Link           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1           RX packets:6811 errors:0 dropped:0 overruns:0 frame:0           TX packets:381 errors:0 dropped:0 overruns:0 carrier:0           collisions:0 txqueuelen:1000           RX bytes:627377 (627.3 KB)  TX bytes:80855 (80.8 KB)  enp0s8    Link encap:Ethernet  HWaddr 08:00:27:98:ec:88           inet addr:10.0.0.81  Bcast:10.0.1.255  Mask:255.255.254.0           inet6 addr: fe80::a00:27ff:fe98:ec88/64 Scope:Link           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1           RX packets:2246 errors:0 dropped:0 overruns:0 frame:0           TX packets:8 errors:0 dropped:0 overruns:0 carrier:0           collisions:0 txqueuelen:1000           RX bytes:209378 (209.3 KB)  TX bytes:1192 (1.1 KB)  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:65536  Metric:1           RX packets:160 errors:0 dropped:0 overruns:0 frame:0           TX packets:160 errors:0 dropped:0 overruns:0 carrier:0           collisions:0 txqueuelen:1           RX bytes:11840 (11.8 KB)  TX bytes:11840 (11.8 KB)  


We convey successfully added newly Interface as well as getting IP address.



That's All
!!!Cheers!!!


Sumber https://linuxhowtoguide.blogspot.com/

Tidak ada komentar:

Posting Komentar