LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 12-09-2005, 11:02 AM   #1
stryka
Member
 
Registered: Oct 2005
Distribution: Slackware
Posts: 44

Rep: Reputation: 15
Assigning IP address


Hi, I've got several ip addresses and I am trying to figure out exactly how to bind them to my machine. I've tried route add ip eth0 and it add's it to the routing table, however I still can't ping it or use the IP. Can someone assist me? Thanks.
 
Old 12-09-2005, 11:29 AM   #2
baldy3105
Member
 
Registered: Jan 2003
Location: Cambridgeshire, UK
Distribution: Mint (Desktop), Debian (Server)
Posts: 891

Rep: Reputation: 184Reputation: 184
ifconfig eth0 <ipaddr> netmask <mask>

Thats not permanent though I don't think. There is a config file that you can edit which I'm sure someone more knowlegable than me will remind me of shortly...
 
Old 12-09-2005, 11:32 AM   #3
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
The configuration depends on the distribution which you don't specify. You could always add the commands to the end of rc.local so that they are run after a reboot. If you are looking to have more than 1 ip per device then you can use alias names - ie "eth0:1" "eth0:2"
 
Old 12-09-2005, 11:38 AM   #4
stryka
Member
 
Registered: Oct 2005
Distribution: Slackware
Posts: 44

Original Poster
Rep: Reputation: 15
Thank you that is what im looking for, one last small question. Can two ip addresses share the same netmask? Btw I'm running slackware, and I will add it to /etc/rc.d/rc.local
 
Old 12-09-2005, 11:41 AM   #5
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
Yes, multiple ip addresses on the machine could have the same netmask.
 
Old 12-09-2005, 11:41 AM   #6
stryka
Member
 
Registered: Oct 2005
Distribution: Slackware
Posts: 44

Original Poster
Rep: Reputation: 15
yes they can, it's normal. Got it working, thanks guys.
 
  


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
DHCP: Problem in assigning fixed address to clients libregeek Linux - Networking 6 11-17-2005 11:59 PM
dhcp networking not assigning address quwiltw Linux - Networking 9 12-22-2004 08:25 AM
assigning memory address to pointer irfanhab Programming 4 04-24-2004 03:35 AM
Assigning site-local ipv6 address to an interface goto Linux - Networking 0 03-24-2003 04:06 AM
assigning ip address after install gui10 Linux - Networking 2 03-06-2002 03:36 PM

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

All times are GMT -5. The time now is 12:27 PM.

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