Benjamin Flesch = definitely rocks.”> How can I define a static Network IP Address for eth0 and create LAN (Local Area Network) Connection in Ubuntu Linux? How to set up my Internet Gateway? ~ mybeNi websecurity, web security and hack stuff.

web securitymybeNi websecurity

How can I define a static Network IP Address for eth0 and create a LAN Connection in Ubuntu Linux?

September 9th, 2007

Open /etc/network/interfaces with your preferred editor (I’m choosing nano) and add the following lines, the example binds eth0 to the IP Address 192.168.178.123:

Run sudo nano /etc/network/interfaces in your Terminal to edit the File and add:

iface eth0 inet static
address 192.168.178.123
netmask 255.255.255.0
broadcast 192.168.178.255
network 192.168.178.0
gateway 192.168.178.1

So what does this mean?

address is the static IP Address you Wish
netmask is your Network’s Subnet Mask
broadcast is your Network’s Broadcast IP Address, normally your IP and the Digits after the last Dot (.) are replaced by 255
network your Class C Network Address, the same as above, but instead of 255 a 0.
gateway Your Gateway’s IP Address, normally your Router so we can get into the Internet ;)

Now just restart your network interfaces and we’re done! :o)



Did you Like this Post? Try these ones! :)

Debian Traffic Shaping Script on October 19th, 2007

Ubuntu HTML in front of Flash Video is hidden, why? on September 7th, 2008

How to rescue your Xorg-Server in a "worst case" scenario? on December 20th, 2007

Linux File System Structure merged into a Picture on September 25th, 2007

How to install nmap on Ubuntu Linux on September 11th, 2008


One Response to “How can I define a static Network IP Address for eth0 and create a LAN Connection in Ubuntu Linux?”:

  1. Ruwan Sampath Wickramathilaka Says:

    How to Create IP Address …


Leave a Reply


Google Traffic (7 days)

250
200
150
100
50
196
190
190
199
219
173
120
38.107.191.100