LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 05-25-2007, 06:41 AM   #1
kalistic
LQ Newbie
 
Registered: May 2007
Posts: 2

Rep: Reputation: 0
Question Configure the default IP address


Hey,

I've got a debian server with a single NIC and 5 IPs. It's all setup, configured and working well. What I want to know is: when I access an external site (lynx, ftp, ssh, wget) which of the ip addresses will show in the remote servers logs?

I've been using tcptrack and it seems that it's always the ip address from the last nic in /etc/network/interfaces.

Is there a way to select which of the ip address should be the default?

Thanks!
 
Old 05-25-2007, 07:04 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
what interface does this match up to on ifconfig? you'll have a default route listed against an interface, e.g. eth0. each ip will be on a seperate logical interface, eth0:1 eth0:2 etc.. and i *assume* that if your default route references, for exmaple, eth0:2 then that's the ip it would have.
 
Old 05-25-2007, 07:33 AM   #3
kalistic
LQ Newbie
 
Registered: May 2007
Posts: 2

Original Poster
Rep: Reputation: 0
It references eth0:3

I think i messed up slightly when setting up the server, as i cut'n'pasted the settings for each of the virtual interfaces. So each of them have a default gateway! which means that when i ask route, I have 5 defaults.

I'll change /etc/network/interfaces so only the eth0 has a default gateway. Should this mean that the ip address assigned to eth0 should now become the 'default'?

As an aside, route shows the gateway address with a '.s' (eg 10.0.168.192.s) which I don't understand.
 
  


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
Making default gateway address permanent in SuSe 10 alienmagic SUSE / openSUSE 9 01-02-2008 10:29 AM
Crontab: How to change the default notification E-mail address? rignes Linux - Software 4 04-04-2007 02:21 PM
Universal default gateway address resolution otisthegbs Linux - Networking 2 07-09-2004 02:28 AM
Obtaining a default gateway IP address from a Win2K workstation Linh Programming 1 02-20-2004 02:55 AM
How do I get iptables to redirect my default gateway address? Paul Woodhouse Linux - Networking 3 11-11-2003 08:52 AM

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

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