ifconfig eth0 add 2100::101/64
ip -6 route add default via 2100::1
ifconfig eth0
The first command assigns a static IPv6 address
to the interface, and the second one assigns
an IPv6 default route.
Your network adapter now has three addresses, as shown below.
The "Link" scope address is automatically configured by the adapter, and only works for traffic on the local network segment, like a MAC address.
The "Global" scope address could be used for communication over the Internet, if it were in a range provided to you by an ISP.
In IPv4, the most common address classes are /8, /16, and /24, also called classes A, B, and C. In IPv6, the addresses are 128 bits long, and the most commmon address type is /64.
ifconfig eth0 add 2100::102/64
ip -6 route add default via 2100::1
ifconfig eth0
Your network adapter now has three addresses,
as shown below.
ping6 2100::102
You should see replies,
as shown below.
Press Ctrl+C to stop the pings.
scapy
i = IPv6()
i.display()
As you can see, the "version" is now 6, as shown below on this page.
The "src" and "dst" addresses are both set to "::1", which is
the IPv6 loopback address, analogous to 127.0.0.1 in IPv4.
If the colors are difficult to see, adjust them by clicking Edit, "Profile Preferences", Colors. I used "Black on light yellow".
In the Sender machine, execute these commands to assign the IPv6 destination address,
i.dst = "2100::102"
i.display()
As shown below,
the src
address automatically fills in.
ic = ICMPv6EchoRequest()
ic.display()
As shown below, this is a very simple
packet, analogous to a normal
IPv4-style ICMP ping:
sr1(i/ic)
You should see a response with type=Echo Reply,
as shown below on this page.
Use these commands to send a packet with your name in it, and look at the reply:
ic.data = "YOUR NAME"
sr1(i/ic)
You should see a response with your name in it,
as shown below on this page.
scapy
p = sniff(filter="udp and dst port 4444", count=1)
The Terminal waits for network traffic,
as shown below on this page.
u = UDP()
u.dport = 4444
u.display()
This creates an object named u of type UDP,
directed at port 4444,
and displays its properties,
as shown below.
Execute this command to send an UDP packet to the Windows machine:
send(i/u/"YOUR NAME SENT VIA IPv6 UDP\n")
On the Receiver Machine,
execute this command to see the
received UDP packet.
p[0]
You should windows like those
shown below.
The Sender Machine is in the left
window, and the Receiver Machine is
on the right
http://packetstorm.Sendersecurity.com/papers/general/blackmagic.txt
http://www.secdev.org/projects/scapy/
Last modified 5-1-12
Update for NETLAB 6-11-16