Friday, 11 March 2016

Setup IP On Ubuntu

root@server:~$]  cat /etc/network/interfaces



First Check which port is active :

# ip link show

p2p1 is active


# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto p2p1
iface p2p1 inet static
    address 192.168.0.121
    netmask 255.255.255.0
    network 192.168.0.0
    broadcast 192.168.0.255
    gateway 192.168.0.1
    # dns-* options are implemented by the resolvconf package, if installed
    dns-nameservers 10.20.30.80 8.8.8.8
    dns-search example.com

:wq

/etc/init.d/networking restart

No comments: