Showing posts with label TCP-IP. Show all posts
Showing posts with label TCP-IP. Show all posts

Sunday, June 23, 2013

Duplicate IP detection

First, check that you can sudo arping:

sudo -l
you should see something like:
(root) NOPASSWD: /sbin/ifconfig, (root) /sbin/arping
then, you can issue the command
sudo /sbin/arping -D -I bond0 -c 2 10.78.1.1


to check if the IP 10.78.1.1 is mounted in 2 places.



Sunday, May 6, 2012

WebLogic whole server migration and wlsifconfig.sh

Generalities on the Whole Server Migration

http://docs.oracle.com/cd/E17904_01/core.1111/e12036/server_migration.htm

https://forums.oracle.com/forums/thread.jspa?messageID=4331554


more in this other post

in $DOMAIN_HOME/bin/server_migration there is this little script "wlsifconfig.sh", who is involved in the Virtual IP migration process - the core of the Server Migration really.

I have opened to see what it does.

There are 3 functions: listif(), removeif(), addif() (where if=network interface)


listif() does a "/sbin/ip -o addr", whose output is a bit intimidating:


1: lo: mtu 16436 qdisc noqueue \ link/loopback 00:00:0 0:00:00:00 brd 00:00:00:00:00:00
1: lo inet 127.0.0.1/8 scope host lo
1: lo inet6 ::1/128 scope host \ valid_lft forever preferred_lft foreve r
2: eth0: mtu 1500 qdisc pfifo_fast maste r bond0 qlen 1000\ link/ether 9c:3e:99:17:6c:90 brd ff:ff:ff:ff:ff:ff
2: eth0 inet 10.10.10.10/32 brd 10.10.10.10 scope global eth0
3: eth1: mtu 1500 qdisc pfifo_fast maste r bond0 qlen 1000\ link/ether 9c:3e:99:17:6c:90 brd ff:ff:ff:ff:ff:ff
4: sit0: mtu 1480 qdisc noop \ link/sit 0.0.0.0 brd 0.0.0.0
5: bond0: mtu 1500 qdisc noqueue \ l ink/ether 9c:8e:39:27:6c:90 brd ff:ff:ff:ff:ff:ff
5: bond0 inet 120.56.5.189/24 brd 10.56.5.255 scope global bond0
5: bond0 inet 120.56.5.183/24 brd 10.56.5.255 scope global secondary bond0:0
5: bond0 inet 120.56.5.182/24 brd 10.56.5.255 scope global secondary bond0:1
5: bond0 inet6 fe80::9e8a:99ff:fea7:6c90/64 scope link \ valid_lft fore ver preferred_lft forever


basically for every nic it gives you all info on its configuration (one day maybe I will understand all this)

The other command is

/sbin/ip -o addr | sed -n 's?.*inet \([0-9.]*\)\/[0-9]* .* \([^ ]*\)?\2 \1?p'

which gives a much more human output, the list of each NIC and its associated IP:

lo 127.0.0.1
eth0 10.10.10.10
bond0 10.56.5.189
bond0:0 10.56.5.183
bond0:1 10.56.5.182


The other function removeif() does a
ifconfig "ipaddress" down
ifconfig "ipaddress" 0.0.0.0


Finally addif() essentially does a
sudo /sbin/ifconfig (some parameter) up

interesting is also the Address Resolution Protocol PING:

/sbin/arping
it needs sudo, example:
sudo /sbin/arping 11.61.286.232

http://en.wikipedia.org/wiki/Arping



Anyway shell scripting is so cryptic that it hurts the eyes.

Sunday, January 2, 2011

A book for 2011 : The TCP/IP Guide by Kozierok

http://www.tcpipguide.com/buybook.htm


Fascinating quote: "the future of information technology lies not so much in bigger and faster computers, but in better ways of exchanging information between them".

The book seems to be really an awesome resource for Network Specialists, but it's 1600 pages.... more than what average developer is actually ready to read....probably a version "ad usum delphini" would be helpful...