You are not logged in.

#1 2005-07-20 07:21:43

raztos
Member
Registered: 2005-07-11
Posts: 26

More IP address in rc.conf ?

Hi

I am using 2 IPs. One is a private and next one is public IP address. The following questions are:

1. How Can I write both IPs to rc.conf ?
2. How can I restart rc.conf without restart PC ?

Thanks a lot !

Offline

#2 2005-07-20 11:22:02

sudman1
Member
From: Huntingdon, UK
Registered: 2005-02-18
Posts: 143

Re: More IP address in rc.conf ?

Two IPs, so you have 2 NICs right?

1) If so, make sure you have entries for eth0 and eth1 in rc.conf.
2) If you run '/etc/rc.d/network restart' it should re-read your rc.conf interfaces.


v/r
Suds

Offline

#3 2005-07-20 17:42:50

raztos
Member
Registered: 2005-07-11
Posts: 26

Re: More IP address in rc.conf ?

No, I have only one NIC. I know that I'll need to use iptables, (that's ok). But I need add some routes. Can I do it over "route" or over rc.conf ?

Offline

#4 2005-07-20 17:48:16

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: More IP address in rc.conf ?

Ummm... what? That doesn't make any sense... how can you have 2 IPs assigned to one interface... I don't think that's even possible.

Can you explain your network topology a bit?

For instance, I have:
DSL modem -> router
router connects to 3 machines, hardwired, and 3 wireless

Offline

#5 2005-07-20 19:07:48

raztos
Member
Registered: 2005-07-11
Posts: 26

Re: More IP address in rc.conf ?

Sure that i'ts possible to have more IPs on one eth. I have a classical microwave to my Provider. One IP is on LAN..it's a private IP address 172.16.51.2 and the next IP is public
62.65.180.11.
You need to add to your eth both address. for exmaple:
eth0 - 172.16.51.2
eth0:1 - 62.65.180.11
Then it is only question of routing...

Offline

#6 2005-07-20 19:15:34

cactus
Taco Eater
From: t͈̫̹ͨa͖͕͎̱͈ͨ͆ć̥̖̝o̫̫̼s͈̭̱̞͍̃!̰
Registered: 2004-05-25
Posts: 4,615
Website

Re: More IP address in rc.conf ?

Here is what I use. Both local, but it is easy to expound on this...
rc.conf snippet

lo="lo 127.0.0.1"
eth0="eth0 192.168.1.40 netmask 255.255.255.0 broadcast 192.168.1.255"
eth01="eth0:1 192.168.1.41 netmask 255.255.255.0 broadcast 192.168.1.255"
INTERFACES=(lo eth0 eth01)

gateway="default gw 192.168.1.1"
localhost="-net 127.0.0.0 netmask 255.0.0.0 metric 0 lo"
ROUTES=(localhost gateway)

Useful for binding lots of ips to a single host..for things like webhosting (ip based virtual hosting, so each host can have its own SSL Cert).

It is also nice for providing mutliple services. I have a dns server running on .41, but not on .40.


"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍

Offline

#7 2005-07-20 19:27:07

raztos
Member
Registered: 2005-07-11
Posts: 26

Re: More IP address in rc.conf ?

Thx, That's what I was looking for. I was interrested only in syntax.

Offline

Board footer

Powered by FluxBB