disable lan through command prompt

  • Thread starter Thread starter polilop
  • Start date Start date
P

polilop

Is there a way to disable local area connection and enable
through command prompt?
The thing i wont to do is a .bat file which i can
scheduel so it starts or disables a lan connection.
 
polilop said:
Is there a way to disable local area connection and enable
through command prompt?
The thing i wont to do is a .bat file which i can
scheduel so it starts or disables a lan connection.

Rather than disabling your LAN connection, you could
change the PC's IP address on the fly like so:

netsh interface ip set address "Local Area Connection" static 125.187.7.56
255.0.0.0

This would make it impossible for the machine to communicate
with other devices on the network.
 
The thing is that i have a lan connection and a modem connection
when they both are active i cant ping through my modem to the remote comp
but when i disable the local area connection i am able to ping. I wish to
schedule
a bat file which will disable my lan, send a message through my modem
connection and
then activate my lan again. Someone told me to erase the gateway on my lan
but that allso
dosent work.
So when i change to this adress(255.0.0.0) do you think it will work
 
Windows assigns the cost of interface (metric) on-the-fly analysing its
declared speed. Thus 10/100Mbps interface (LAN adapter) metric is lower than
any modem interface metric and IP packets are routed on more effective
(best) 10/100Mbps interface. That's why ping is going thru LAN interface.

Increase LAN metric when you establish a dial-up connection using 'route'
command similar to

route change 0.0.0.0 mask 0.0.0.0 192.168.1.1 metric 100 if {interfaceNo}

netsh int del int [name=]<string> deletes a particular interface at the
router completely and
netsh int add int [name=]<string> [[type=]full] adds an interface.
 
Back
Top