Linux, FreeBSD, Juniper, Cisco / Network security articles and troubleshooting guides

FAQ
It is currently Wed Aug 23, 2017 8:48 am


Internet Protocol, Transport Control Protocol, Network protocols, Routing, Routers, IP aliases, Routes, Ethernet

Author Message
debuser
Post  Post subject: How to add IP alias in Debian Linux to last after reboot  |  Posted: Mon Dec 05, 2011 7:38 am

Joined: Thu Aug 06, 2009 2:48 am
Posts: 105

Offline
 

How to add IP alias in Debian Linux to last after reboot

To add and ip alias in Debian to survive a reboot, edit the file "/etc/network/interfaces" and create a subinterface for ethX and set it's ip address:
Code:
iface eth3:0 inet static
        address 10.0.0.23
        netmask 255.255.255.240
        network 10.0.0.16
        broadcast 10.0.0.31


As soon as the device is rebooted or the network service restarted, this change will take effect. To add the alias immediately without restart, you can use ip command:
Code:
user~ sudo ip a add 10.1.1.23/28  dev eth3:0


This is it.





Top
Zettie49
Post  Post subject: Re: How to add IP alias in Debian Linux to last after reboot  |  Posted: Tue Dec 06, 2011 6:24 am

Joined: Tue Dec 06, 2011 6:11 am
Posts: 3

Offline
I'm using dyndns.org to maintain my domain, and I use inadyn to keep my ip updated at that site (in case my link fails and my ip gets changed.)
I need to execute this at the command line after every reboot: inadyn -u <username> -p <password> -a ashesh.homeip.net
Given that I'm using FC 6, is there some place I can add this line so that it is executed automatically during bootup?
I'll really appreciate your help guys.
Thanks in advance,


Top
admin
Post  Post subject: Re: How to add IP alias in Debian Linux to last after reboot  |  Posted: Tue Dec 06, 2011 8:12 am
Site Admin

Joined: Mon Aug 03, 2009 8:43 am
Posts: 95

Offline
How about using cron @reboot ? It's a cross platform workaround.

Code:
@reboot  /path/to/script

_________________
VPSie - SSD VPS servers in AMS-IX, LINX, DE-CIX
https://vpsie.com


Top
Harespok
Post  Post subject: Re: How to add IP alias in Debian Linux to last after reboot  |  Posted: Sat Jul 21, 2012 6:03 am
Now that you have the port number, you can simply go to your router and forward that port completely and then turn on your remote desktop feature it will work out of your network, since you want to know your IP address or have a dynamic DNS service like I use. To enable Remote Desktop in Windows XP and Windows 2003 go to the Start menu, locate the My Computer icon and right click on it.


Top
Display posts from previous:  Sort by  
E-mail friendPrint view

Topics related to - "How to add IP alias in Debian Linux to last after reboot"
 Topics   Author   Replies   Views   Last post 
There are no new unread posts for this topic. IPv6 tunnel - Debian Linux and tunnelbroker.net - IPv6 in IPv4 (ip protocol 41)

mandrei99

0

1637

Sun Feb 01, 2015 4:17 am

mandrei99 View the latest post

There are no new unread posts for this topic. How to force NTP in Debian/Ubuntu to synchronize to IPv4 servers, not IPv6 (default \w both proto)

mandrei99

0

1299

Wed Jun 18, 2014 11:04 am

mandrei99 View the latest post

There are no new unread posts for this topic. Fatal error: Trying to set unexisting parameter 'gmysql-host' - PowerDNS error on Debian

mandrei99

0

3847

Tue Jan 13, 2015 12:03 pm

mandrei99 View the latest post

There are no new unread posts for this topic. Linux: How to list IPv6 neighbors

mandrei99

0

706

Thu Oct 09, 2014 3:11 am

mandrei99 View the latest post

There are no new unread posts for this topic. How to add (persistent) static ARP entries in Linux

mandrei99

0

10674

Mon Sep 29, 2014 5:17 am

mandrei99 View the latest post

There are no new unread posts for this topic. Linux How to change hardware MAC address of an interface

debuser

1

891

Tue Dec 06, 2011 6:26 am

Zettie49 View the latest post

There are no new unread posts for this topic. DNS reverse lookup in Windows 7 and Linux using - nslookup

mandrei99

0

2592

Tue Jan 13, 2015 8:31 pm

mandrei99 View the latest post

There are no new unread posts for this topic. How to dump kernel route cache in Linux

mandrei99

0

1588

Mon Jan 12, 2015 11:26 am

mandrei99 View the latest post

There are no new unread posts for this topic. Set up FTP PROXY via command line in Linux/FreeBSD

mandrei99

0

15229

Tue Jan 20, 2015 5:01 pm

mandrei99 View the latest post

There are no new unread posts for this topic. Linux adding and removing vlan tagged interfaces

mandrei99

0

18254

Wed Aug 28, 2013 8:19 am

mandrei99 View the latest post

 

Who is online
Users browsing this forum: No registered users and 0 guests
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum
Jump to:  
News News Site map Site map SitemapIndex SitemapIndex RSS Feed RSS Feed Channel list Channel list


Delete all board cookies | The team | All times are UTC - 5 hours [ DST ]



phpBB SEO