≡ Menu

/etc/network/interfaces

How do I configure networking or network interface card on HP Debian Linux U1 Server?
[click to continue…]

Ubuntu Restart Networking Command

How do I restart networking on Ubuntu Linux system from a shell prompt?
[click to continue…]

I've recently installed Debian Linux 4.0 on my server and Ubuntu Linux 7.04 on Laptop. I would love to have a multiple IP address that I can use for verity of purposes. I would like to bind 4 IP's to the 'eth0' device or NIC. How do I achieve this?
[click to continue…]

Debian / Ubuntu Linux Setting a Default Gateway

Q. How do I setup a default gateway on Debian or Ubuntu Linux? My router IP is 192.168.1.254 and I'd like to setup this as a default gateway for Debian Linux.

A. You can use command line tool such as
a] ip command - show / manipulate routing, devices, policy routing and tunnels

b] route command - show / manipulate the IP routing table

c] Save routing information to a configuration file so that after reboot you get same default gateway.

ip command to set a default router to 192.168.1.254

Login as the root and type:
# ip route add default via 192.168.1.254
OR
$ sudo ip route add default via 192.168.1.254

route command to set a default router to 192.168.1.254

Login as the root and type:
# route add default gw 192.168.1.254
OR
$ sudo route add default gw 192.168.1.254

Save routing information to a configuration file /etc/network/interfaces

Open /etc/network/interfaces file
# vi /etc/network/interfaces
OR
$ sudo vi /etc/network/interfaces
Find eth0 or desired network interface and add following option
gateway 192.168.1.254
Save and close the file. Restart networking:
# /etc/init.d/networking restart
OR
$ sudo /etc/init.d/networking restart

Q. I would like to create alias for my network card (NIC). How do I setup 2 IP address on One NIC? How do I add alias under Centos / Fedora / Debian / Ubuntu Linux?
[click to continue…]