Have u ever thought how to assign
Two Static Ip address to Pc.
1. First find one free Ip on your domain.
For This use hunt Command (Install hunt Package).
2. Install brctl package on your computer.
3. Now write shell script get an ip .
############### getip.sh #############
a. #sudo brctl addbr br0
b. #sudo ifconfig br0 192.168.1.175 netmask 255.255.255.0 up
c. #sudo ifconfig eth0 down
d. #sudo ifconfig eth0 0.0.0.0 up
e. #sudo route add default gw 192.168.1.250 br0
f. #sudo brctl addif br0 eth0
g. #sudo /etc/init.d/networking restart
##########End of Code#############
Description:
a. Creating a virtual interface br0 (For more See man brctl)
b. Now assign ip to your new interface and start the device.
c. Stop your eth device (use ifconfig to check ur eth device)
d. start eth devic in promisc mode.
e. add gateway to new interface br0.
f. now bridge both interface eht0 and br0
g. restart network to take effect the changeg.
And test system with two ip..
After Finishing ur work release the ip
############Releaseip.sh#####################
a. #sudo ifconfig eth0 down
b. #sudo ifconfig br0 down
c. #sudo brctl delif br0 eth0
d. #sudo brctl delbr br0
e. #sudo ifconfig eth0 192.168.1.188 netmask 255.255.255.0 up
f. #sudo route add default gw 192.168.1.250 eth0
g. #sudo /etc/init.d/networking restart
###############End of Code###############

No comments:
Post a Comment