Unix Technical Forum

Re: Changing IP addresses

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 ...


Go Back   Unix Technical Forum > Unix Operating Systems > OpenBSD > comp.unix.bsd.openbsd.misc

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-16-2008, 04:32 AM
mr_scary
 
Posts: n/a
Default Re: Changing IP addresses

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-16-2008, 04:32 AM
Marco S Hyman
 
Posts: n/a
Default Re: Changing IP addresses

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-16-2008, 04:32 AM
mr_scary
 
Posts: n/a
Default Re: Changing IP addresses

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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 10:00 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com