Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.package
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Guillaume Hervier
slapos.package
Commits
46c1b4e5
Commit
46c1b4e5
authored
May 02, 2013
by
Jondy Zhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add babeld readme for cygwin
parent
2811db0f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
201 additions
and
0 deletions
+201
-0
windows/babeld/README.cygwin
windows/babeld/README.cygwin
+201
-0
No files found.
windows/babeld/README.cygwin
0 → 100644
View file @
46c1b4e5
Introduction
============
Babeld for windows can work in the Cygwin 1.7 and later.
Changed files
-------------
Makefile
net.c
kernel.c
New files
---------
kernel_cygwin.c
cyginet.h
cyginet.c
README.cygwin
Building in the cygwin
======================
Required packages:
Cygwin 1.7
gcc 4.5.3 for cygwin
In the Windows XP,
$ WINVER=XP make
Later Windows Vista,
$ WINVER=VISTA make
It will generate babeld.exe in the current directory.
Build testc.exe, it's used to verify the functions in the cyginet.c
$ WINVER=XP make testc.exe
$ ./testc.exe
Interface Names
===============
Use network connection name as interface name. On XP Go to Start ->
Control Panel -> Network Connections.
You should see all the connections like "Local Area Connection
3". Right click and rename this to something shorter and without
embedded spaces such as "tap1".
Or
$ netsh interface set interface name = "Local Area Connection 3" newname="tap1"
Test babeld in the Cygwin
=========================
We need 2 laptops, a wireless router, one laptop connects the router
by wireless netcard, another is wired.
Both of laptops install Openvpn for cygwin, enable ipv6 forwarding on
each tap interface
Laptop A:
lan Disconnect
wlan 192.168.121.100/24
2001::A1 (manual)
tap ifindex = 11, ipv6 forwarding=enabled
10.100.0.1/24
fe80::2ff:38ff:fed8:7d97 (auto link addr)
Laptop B:
lan 192.168.121.21/24
2001::B1 (manual)
tap ifindex = 7, ipv6 forwarding=enabled
10.200.0.1/24
fe80::2ff:17ff:fee4:8ed0 (auto link addr)
Router R:
192.168.121.1/24
In the laptop A, run the following command:
# Start openvpn server
$ cd C:/Program Files/OpenVPN/server
$ ../bin/openvpn.exe --config server.ovpn
# Startup babeld
$ babeld.exe -d 3 -h 15 -H 15 -s wlan tap
# Assign ipv6 unicast address to interfaces
# netsh interface ipv6 add address wlan 2001:A1
# netsh interface ipv6 set interface tap forwarding=enabled
In the laptop B, run the following command:
# Start openvpn client
$ cd C:/Program Files/OpenVPN/client
$ ../bin/openvpn.exe --config client.ovpn
# Startup babeld
$ babeld.exe -d 3 -h 15 -H 15 -s lan tap1
# Assign ipv6 unicast address to interfaces
# netsh interface ipv6 add address lan 2001:B1
# netsh interface ipv6 set interface tap forwarding=enabled
Then ping6 to each other ,
In laptop A,
$ ping6 2001::B1
In laptop B,
$ ping6 2001::A1
It should work.
Check kernel route:
$ netsh interface ipv6 show route
Example output of A
Publish Type Met Prefix Idx Gateway/Interface Name
------- -------- ---- ------------------------ --- ---------------------
no Manual 0 ::/0 11 fe80::2ff:17ff:fee4:8ed0
Example output of B
Publish Type Met Prefix Idx Gateway/Interface Name
------- -------- ---- ------------------------ --- ---------------------
no Manual 0 ::/0 7 fe80::2ff:38ff:fed8:7d97
Notes
=====
1. If network connection is disabeld, its interface name will NOT be
recognize by Babeld in the Cygwin.
2. For the option "-z", kind value could be "0", "1", others is not
supported. Because no any API channels in the Windows XP, even for
wireless interface.
3. Only -t 0, -T 0 is valid, no multi-route tables in the Windows.
4. IPV6_TCLASS doesn't work, so babeld will complain:
"Couldn't set traffic class"
5. Ipv6 option "IPV6_V6ONLY" only works in the Windows Vista later.
6. If one connection is assigned more than one ipv4 address, babeld
returns the first one only to check whether ipv4 address changed,
is it right? I'm not sure.
7. Regarding IPV6CTL_FORWARDING and IPV6CTL_SENDREDIRECTS, MSDN says
that you can set both of options in the registry:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip6\Parameters
IPEnableRouter, DWORD
EnableICMPRedirect, DWORD
Refers to:
http://support.microsoft.com/kb/315236/en-us
http://technet.microsoft.com/en-us/library/cc766102(v=ws.10).aspx
http://msdn.microsoft.com/en-us/library/aa915651.aspx
For Ipv6, FORWARDING is set per interface, not global setting.
8. There is no RTM_BLACKHOLE, RTM_REJECT, NULLROUTE in the windows, in
the kernel_cygwin.c!kernel_route, we only use local address as
gateway in the BLACKHOLE route entry. Is it OK?
A: It's not OK actually for ipv4. In the Windows, you can't use
127.0.0.1 as gateway when add route entry. So the solution is
find one interface other than loopback interface, then use its
uni-address as gateway, it will be a blackhole route entry. For
example, if you have an interface which ip addr is
192.168.128.100, and ifindex is 5, then
$ route add 100.28.0.0 mask 255.255.0.0 192.168.128.100 if 5
Destination network 100.28.0.0/16 will be unreachable.
9. IN6_LINKLOCAL_IFINDEX && SET_IN6_LINKLOCAL_IFINDEX, do both of them
work in the Windows?
A: We can ignore both of them. In the windows, it use the following
format to specify interface index in the link local address:
fe80::2ff:38ff:fed8:7d97%11
10. For ipv4, blackhole route doesn't work now. I can't find a simple
way to do it in the Windows.
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment