LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 08-20-2007, 10:45 AM   #1
satimis
Senior Member
 
Registered: Apr 2003
Posts: 3,695

Rep: Reputation: 56
Config on /etc/network/interfaces


Hi folks,


Ubuntu 7.04 lamp server amd64
only one NIC


Connection
Server --> Router --> DSL Modem --> ISP

The router is supplied by ISP and password-locked by ISP. I suppose 192.168.0.1 is the gateway. How can I check it?


Fixed IP
220.232.213.178

IP address reserved for server on Router
192.168.0.10

DNS
202.14.67.4/14


$ cat /etc/network/interfaces
Code:
# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet dhcp

Now I'll change the second part after "auto eth0" as:
Code:
auto eth0
iface eth0 init static
	address 192.168.0.10
	netmask 255.255.255.255
	network ???
	broadcast ???
	gateway ???
	# dns -* options are implemented by the resolvconf package, if installed
	dns-nemserver 202.14.67.4 204.14.67.14
Please advise what shall I enter for
network ???
broadcast ???
gateway ???


Shall I put the fix IP (202.232.213.178) here? It is for external only.


TIA


B.R.
satimis
 
Old 08-20-2007, 11:37 AM   #2
TigerOC
Senior Member
 
Registered: Jan 2003
Location: Devon, UK
Distribution: Debian Etc/kernel 2.6.18-4K7
Posts: 2,380

Rep: Reputation: 49
Ping the router starting with 192.168.0.1 until you get a response, or ask your isp.
You don't really need to worry about the network or broadcast but they are 192.168.0.0 and 192.168.0.255 respectively. The gateway would be the router address which you will have to find out as above.
 
Old 08-20-2007, 09:56 PM   #3
satimis
Senior Member
 
Registered: Apr 2003
Posts: 3,695

Original Poster
Rep: Reputation: 56
Quote:
Originally Posted by TigerOC View Post
Ping the router starting with 192.168.0.1 until you get a response, or ask your isp.
You don't really need to worry about the network or broadcast but they are 192.168.0.0 and 192.168.0.255 respectively. The gateway would be the router address which you will have to find out as above.
Hi TigerOC,


Tks for your advice.


$ ping -c3 192.168.0.1
Code:
PING 192.168.0.1 (192.168.0.1) 56(84) bytes of data.
64 bytes from 192.168.0.1: icmp_seq=1 ttl=150 time=0.651 ms
64 bytes from 192.168.0.1: icmp_seq=2 ttl=150 time=0.707 ms
64 bytes from 192.168.0.1: icmp_seq=3 ttl=150 time=0.709 ms

--- 192.168.0.1 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2005ms
rtt min/avg/max/mdev = 0.651/0.689/0.709/0.026 ms
$ ping -c3 192.168.0.11
Code:
PING 192.168.0.11 (192.168.0.11) 56(84) bytes of data.
64 bytes from 192.168.0.11: icmp_seq=1 ttl=64 time=0.031 ms
64 bytes from 192.168.0.11: icmp_seq=2 ttl=64 time=0.021 ms
64 bytes from 192.168.0.11: icmp_seq=3 ttl=64 time=0.021 ms

--- 192.168.0.11 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2000ms
rtt min/avg/max/mdev = 0.021/0.024/0.031/0.006 ms
I suppose this is the IP add assigned to this PC.

$ ifconfig -a
Code:
eth0      Link encap:Ethernet  HWaddr 00:0E:A6:F9:A3:5B  
          inet addr:192.168.0.11  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: fe80::20e:a6ff:fef9:a35b/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:5722 errors:0 dropped:0 overruns:0 frame:0
          TX packets:5195 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:4892417 (4.6 MiB)  TX bytes:999181 (975.7 KiB)
          Interrupt:20 Base address:0x6000 

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:18 errors:0 dropped:0 overruns:0 frame:0
          TX packets:18 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:1848 (1.8 KiB)  TX bytes:1848 (1.8 KiB)
Yes, confirmed.



$ ping -c3 192.168.0.10
Code:
PING 192.168.0.10 (192.168.0.10) 56(84) bytes of data.
From 192.168.0.11 icmp_seq=1 Destination Host Unreachable
From 192.168.0.11 icmp_seq=2 Destination Host Unreachable
From 192.168.0.11 icmp_seq=3 Destination Host Unreachable

--- 192.168.0.10 ping statistics ---
3 packets transmitted, 0 received, +3 errors, 100% packet loss, time 2001ms
, pipe 3
$ ping -c3 192.168.0.12
$ ping -c3 192.168.0.9
both
Code:
--- 192.168.0.9 ping statistics ---
3 packets transmitted, 0 received, +3 errors, 100% packet loss, time 2010ms

B.R.
satimis
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Network interfaces do not bring up on network restart rajat Linux - Networking 1 06-20-2007 04:44 AM
For laptop - different networks in /etc/network/interfaces, or use network-manager? dmravaet Linux - Wireless Networking 4 03-17-2007 11:42 PM
Manual Network Setup Works, /etc/network/interfaces doesn't verdeboy2k Linux - Wireless Networking 0 05-31-2006 06:56 PM
/etc/network/interfaces angel115 Linux - Networking 1 10-23-2005 04:29 AM
config smb to use multiple interfaces netguy2000 Linux - Networking 0 01-03-2004 05:45 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 01:37 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration