ifconfig/ ifupdown/ ip -
- Date: Mon, 9 Jul 2018 11:52:36 +1000
- From: Zenaan Harkness <zenaan@xxxxxxxxxxxx>
- Subject: ifconfig/ ifupdown/ ip -
So I change between two internet connections from time to time.
I use /etc/network/interfaces ("/e/n/i")
When I modify /e/n/i , I then run a little "reset" script, like so:
ifconfig $dev down
Here and there I've had problems.
Recently I discovered the ip command.
Apparently, after reconfiguring as above, two IP addresses end up
attached to eth0 - one for each (staticly configured in /e/n/i)
ISP network connection.
So now I am manually running something like:
ifconfig eth0 down
ip address del 10.1.1.30/24 dev eth0
ip address del 192.168.1.30/24 dev eth0
ip address del fe80::f2de:f1ff:fef7:ea96/64 dev eth0
But this (atm) is a very manual process, and it seems to me that I am
not taking down eth0 properly, and that I should not have to
introduce IP address awareness into my eth reset script, just to
properly reset my eth0 static configuration.
Any pointers of what I need to read/ what I am missing, would be