This is a discussion on Re: Changing IP addresses within the comp.unix.bsd.openbsd.misc forums, part of the OpenBSD category; --> On 27 Aug 2003 11:41:42 GMT, Jim@nospam.com said the following: >My OpenBSD 3.2 server needs to be fysically moved ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| On 27 Aug 2003 11:41:42 GMT, Jim@nospam.com said the following: >My OpenBSD 3.2 server needs to be fysically moved to a new location and >gets new ip addresses (for example): > >100.100.100.100 -> 200.100.100.100 >100.100.100.107 -> 200.100.100.107 > >gateway: 100.100.100.1 -> 200.100.100.1 > >When the server is removed from the old place and connected to the >new network I would like the server to work with the new ip addresses. >I need to do this remote. Use ifconfig to configure your adapters: # ifconfig <driver> inet 200.100.100.100 netmask <xxx.xxx.xxx.xxx> # ifconfig <driver> inet 200.100.100.107 netmask <xxx.xxx.xxx.xxx> If you are doing this remotely you will lose the connection. >I've added the new ip addresses as aliases to /etc/hostname.rl0 Why aliases? >The gateway is also changing. I can only enter one default gateway in /etc/mygate. >How can I make sure that when the new ipaddress is working it will use the new gateway. Use route to configure your default gateway: # route add default 200.100.100.1 |
| |||
| petermatulis@NO_SPAMyahoo.ca (mr_scary) writes: > # ifconfig <driver> inet 200.100.100.100 netmask <xxx.xxx.xxx.xxx> > # ifconfig <driver> inet 200.100.100.107 netmask <xxx.xxx.xxx.xxx> [ snip ] > Why aliases? Using ifconfig to set an address replaces existing addresses. If you want to *change* and address that is the thing to do. If you want to give an interface multiple concurrent addresses you use an alias. If the alias is on the same subnet you want to make sure the netmask for the alias is 255.255.255.255. // marc |
| ||||
| On 27 Aug 2003 15:47:31 -0700, Marco S Hyman <marc@snafu.org> said the following: >petermatulis@NO_SPAMyahoo.ca (mr_scary) writes: > >> # ifconfig <driver> inet 200.100.100.100 netmask <xxx.xxx.xxx.xxx> >> # ifconfig <driver> inet 200.100.100.107 netmask <xxx.xxx.xxx.xxx> > >[ snip ] > >> Why aliases? > >Using ifconfig to set an address replaces existing addresses. If >you want to *change* and address that is the thing to do. That what he seems to want. He is moving his box and he wants new addresses. >If you want to give an interface multiple concurrent addresses you use an >alias. Yes, I know. |