LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 10-11-2007, 10:22 AM   #1
carlosinfl
Senior Member
 
Registered: May 2004
Location: Orlando, FL
Distribution: Arch
Posts: 2,905

Rep: Reputation: 77
Question How To Check Your Gateway IP


I am running 7.04 Ubuntu and I have recently setup my IP staticly in /etc/network/interfaces as shown below however I was not sure how I release & renew for the settings to take place. I really just need to know if my PC is not using the newly set static default gateway. Can someone please tell me how I can tell what my DG is set to? The "ifconfig eth0" command does not specify the DG.

Code:
# 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 eth0
iface eth0 inet static
        address 10.1.1.204
        netmask 255.255.0.0
        network 10.1.1.0
        broadcast 10.1.1.255
        gateway 10.1.1.231
 
Old 10-11-2007, 10:29 AM   #2
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
Quote:
Originally Posted by Carlwill
Can someone please tell me how I can tell what my DG is set to?
netstat -rn
 
Old 10-11-2007, 11:08 AM   #3
carlosinfl
Senior Member
 
Registered: May 2004
Location: Orlando, FL
Distribution: Arch
Posts: 2,905

Original Poster
Rep: Reputation: 77
Quote:
Originally Posted by anomie View Post
netstat -rn
I am confused as to why my static IP settings are not being utilized.

Code:
cwilliams@cwilliams:~$ netstat -rn
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
10.1.0.0        0.0.0.0         255.255.0.0     U         0 0          0 eth0
0.0.0.0         10.1.1.1        0.0.0.0         UG        0 0          0 eth0
 
Old 10-11-2007, 11:14 AM   #4
MadTrapper
LQ Newbie
 
Registered: Feb 2007
Location: Alberta Canadfa
Distribution: RH9 Ubuntu
Posts: 1

Rep: Reputation: 0
Gateway IP

Edit:-

/etc/resolv.conf using vi so #vi /etc/resolv.conf

you should also edit /etc/hosts if you are changing the network third octet
 
Old 10-11-2007, 11:17 AM   #5
carlosinfl
Senior Member
 
Registered: May 2004
Location: Orlando, FL
Distribution: Arch
Posts: 2,905

Original Poster
Rep: Reputation: 77
Quote:
Originally Posted by MadTrapper View Post
Edit:-

/etc/resolv.conf using vi so #vi /etc/resolv.conf

you should also edit /etc/hosts if you are changing the network third octet
Why would I want to edit my resolve.conf? That info is correct and should not change. I do however only want to make sure I am using the newly specified DG in my interfaces config file.

It simply appears that I made a change from dynamic to static and now I just can't seem to figure out how to apply those changes (I assume rebooting obviously would do the trick but I want to avoid that).

resolve.conf is simply pointing to the correct name (DNS) servers I want to continue using.
/etc/hosts is simply stating my DNS hostname on the LAN which as well should not be changing.

My dynamic settings were as follows:

ip = 10.1.1.204
sm = 255.255.0.0
dg = 10.1.1.1

I now simply added it as static the same as dynamic with a new DG for testing.

Last edited by carlosinfl; 10-11-2007 at 11:23 AM.
 
Old 10-11-2007, 01:31 PM   #6
carlosinfl
Senior Member
 
Registered: May 2004
Location: Orlando, FL
Distribution: Arch
Posts: 2,905

Original Poster
Rep: Reputation: 77
Anyone? I really need to know why my static set DG is not taking effect into my LAN.
 
Old 10-11-2007, 08:45 PM   #7
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
I don't know debian/ubuntu, but since I answered earlier (and no one else is chiming in), I have to ask: have you restarted your network service? If not, do so. If you can't tolerate a minor network interruption, then make the changes in real-time using route.
 
Old 10-17-2007, 07:31 AM   #8
linux4begin
LQ Newbie
 
Registered: Oct 2007
Location: India
Distribution: Ubuntu,RedHat,Suse Linux,DEBIAN.
Posts: 17
Blog Entries: 1

Rep: Reputation: 0
Smile route -n This is very easy way to find out g/w

Dear

route -n

with this command you can easily find out the g.w/
This command works on redhat and suse platform also.

try it.
 
  


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
Health Check / Server Completion Check Software? tells Linux - Enterprise 0 04-20-2006 11:03 AM
Partition check, check double check Vincentius Linux - General 0 12-25-2004 05:47 AM
Media Check= FAIL - MDSUMs Check out tgrier Linux - Newbie 6 11-26-2004 10:07 PM
Odd problem: Gateway unreachable after certain amount of time (Win XP Gateway) SocialEngineer Linux - Networking 2 08-13-2004 12:54 AM
Boot disk; check. CD in drive; check. Doesn't work; check. Hal DamnSmallLinux 7 02-04-2004 02:10 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 06:27 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