Table of Content

Introduction

IPv6 forwarding is idential to Ipv4 forwarding except that you have larger address space. This follows our discussion in IPv4 forwarding and provides a brief discussion.

Diamond IPv6 Network Setup

The following setup isn’t complete. You can complete it by yourself when you understand it.

  1. We plan to deploy the following IP networks to the Diamond Ethernets.

    Ethernet IPv6 Network
    DiamondMidwoodFlatbush fc00::1:1:1/124
    DiamondMidwoodbushwick fc00::1:1:16/124
    DiamondFlatbushEastNY fc00::1:1:32/124
    DiamondBushwickEastNY fc00::1.1.48/124

    Following the above plan, we have the following IPv6 address assignments to the NICs on the four VMs.

    Host name NIC:IP Address Linux Command
    midwood enp0s9: fc00::1:1:1 ip address add fc00::1:1:1/124 dev enp0s9
    midwood enp0s10: fc00::1.1.17  
    flatbush enp0s9: fc00::1:1:2 ip address add fc00::1:1:2/124 dev enp0s9
    flatbush enp0s10: fc00::1:1:33 ip address add fc00::1:1:33/124 dev enp0s10
    bushwick enp0s9: fc00::1:1:18  
    bushwick enp0s10: fc00::1:1:49  
    eastny enp0s9: fc00::1:1:34 ip address add fc00::1:1:34/124 dev enp0s9
    eastny enp0s10: fc00::1:1:50 ip address add fc00::1:1:50/124 dev enp0s10
  2. For a packet originated at midwood to reach eastny (2 hops away), we need to configure flatbush to act as a forwarding node.

      brooklyn@flatbush:~$ sudo sysctl -w net.ipv6.conf.all.forwarding=1
      net.ipv6.conf.all.forwarding = 1
      brooklyn@flatbush:~$
    
  3. We also need to update the forwarding table at midwood, and the forwarding table at eastny. Without the former, midwood does not know where it should transmit a packet whose destination is on eastny. Without the later, easny does not know where to transmit a reply.

    Host name Linux Command to Add Route
    midwood ip -6 route add fc00::1:1:32/124 via fc00::1:1:2
    eastny ip -6 route add fc00::1:1:0/124 via fc00::1:1:33

    To display the IPv6 forwarding (routing) table on a Linux system, we do,

    ip -6 route show
    

Experiments

The hello Web Server and its Client

We use the programs in the Web Capture experiment.

  1. We deploy hello.py to eastny, for which, we revise the program to listen to the IPv6 address easny is assigned to.

      from flask import Flask
    
      app = Flask(__name__)
    
      @app.route("/")
      def hello():
              return "Hello, World!"
    
      if __name__ == "__main__":
              app.run(host='fc00::1:1:34', port=50001)
    

    We deploy the helloclient.py to midwood. There is just a line change to match the end point of the server.

  # ...
  conn = httpclient.HTTPConnection('[fc00::1:1:34]:50001')
  # ...
After the deployment, run the server, and then the client. What do you
observe? 
  1. We revise hello.py on eastny to listen the link local IPv6 address, e.g., the one line change is,

    app.run(host='fe80::a00:27ff:fe34:ead3%enp0s10', port=50001)	
    

    We the deploy helloclient.py to bushwick, and for which, we have a one line change also, e.g.,

    conn = httpclient.HTTPConnection('[fe80::a00:27ff:fe34:ead3%enp0s10]:50001')
    

    You may want to consider two questions,

    1. Why do we have to include the network interace name now?
    2. Do the network interface names must match between the sender and the receiver like this example, or is it just a happenstance?

ScaPy Experiment

You can send and capture packets using ScaPy like we do in the IPv4 forwarding experiments. The following perhaps is a start,

>>> packet = IPv6()
>>> packet.display()
###[ IPv6 ]###
  version= 6
  tc= 0
  fl= 0
  plen= None
  nh= No Next Header
  hlim= 64
  src= ::1
  dst= ::1
>>>

Experiments and Exploration

Complete the above experiments.