You are not logged in.

#1 2007-05-16 07:49:13

dids22
Member
Registered: 2007-01-02
Posts: 251

change ip with not dialer

hey
i'm connected to the internet with no dialer (some calls it mpls)
for change ip in windows, i need run this scrips

ipconfig /release
netsh interface ip set address "local area connection" static 192.168.0.10 255.255.255.0 192.168.0.1 1
ipconfig /release
netsh interface ip set address "local area connection" dhcp

i tried to make a new script for arch but the ip stay the same

#! /bin/bash
INET_IP=`/sbin/ifconfig eth0 | grep 'inet addr' | awk '{print $2}'| sed -e 's/.*://'` #Get IP
echo your old ip was $INET_IP
ifconfig eth0 192.168.0.2 netmask 255.255.255.0 broadcast 192.168.0.255
dhcpcd eth0 -k
sleep 2
dhcpcd eth0
sleep 2
INET_IP=`/sbin/ifconfig eth0 | grep 'inet addr' | awk '{print $2}'| sed -e 's/.*://'` #Get IP
echo your new ip is $INET_IP

someone know what this command do

ipconfig /release

??
without her ,it will not work.

ty

Offline

Board footer

Powered by FluxBB