Network connections come up after ifdown'ing them?[Solved]

Post here if you are a new Porteus member and you're looking for some help.
Post Reply
rgroner
Black ninja
Black ninja
Posts: 58
Joined: 23 Oct 2014, 14:23
Distribution: Porteus 3.0.1
Location: U.S.

Network connections come up after ifdown'ing them?[Solved]

Post#1 by rgroner » 30 Jan 2015, 13:56

I'm using Porteus to test a network switch. The way we test it is we have 8 ethernet interfaces connected to the 8 ports of the switch. We turn on one ethernet interface at a time (ifconfig eth1 up), download some data from the attached network, and then turn off the interface (ifconfig eth1 down).

The test works great, as long as only one interface is up at a time. If more than 1 is up, then the test can silently fail because there would be multiple paths to the attached network, which means we're not necessarily testing the interface we want.

I'm using python to do all of this, to form the commands and then execute them. I take each ethernet interface down (ifconfig eth0 down), and then check ifconfig to make sure the interface IS down (ifconfig | grep eth0). When they are all down, I can begin the test. However, I have seen several times now that after I put the last ethernet interface down (ifconfig eth7 down), that suddenly ethernet interfaces are coming up and getting IP addresses. I execute (ifconfig | grep 192.168) and it shows several entries. That causes the test to stop because there should not have been any ethernet interfaces up and running.

That's all background.

Is there some reason an ethernet interface would come back up after it has been taken down? And if there is....is there a way to keep that from happening? I need the ethernet interfaces to only come up when I want them to.
Last edited by rgroner on 30 Jan 2015, 20:25, edited 1 time in total.

User avatar
fanthom
Site Admin
Site Admin
Posts: 4621
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland, currently - Cork, IE
Contact:

Re: Network connections come up after ifdown'ing them?

Post#2 by fanthom » 30 Jan 2015, 17:13

have you stopped Network Manager in the system?
please boot with 'nonetwork' cheatcode and that should resolve this.
Please add [Solved] to your thread title if the solution was found.

rgroner
Black ninja
Black ninja
Posts: 58
Joined: 23 Oct 2014, 14:23
Distribution: Porteus 3.0.1
Location: U.S.

Re: Network connections come up after ifdown'ing them?

Post#3 by rgroner » 30 Jan 2015, 18:58

Hmm....shoulda known there was a cheatcode for that. Cheatcodes...is there anything they can't do?? :good:

It appears to be better now....so far no interfaces are resurrecting themselves.

Post Reply