In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article analyzes "how to use open source software to create SDN in Linux systems". The content is detailed and easy to understand, and friends who are interested in "how to use open source software to create SDN in the Linux system" can follow the editor's train of thought to read it in depth. I hope it will be helpful to everyone after reading. Let's follow the editor to learn more about how to use open source software to create SDN in Linux systems.
Network routing protocols are divided into two categories: internal gateway protocol and external gateway protocol. Routers use the internal gateway protocol to share information within a single autonomous system. If you are using Linux, you can make it behave like a router through the open source (GPLv2) routing protocol stack Quagga.
What is Quagga?
Quagga is a routing package and is a branch of GNU Zebra. It provides the implementation of all the mainstream routing protocols for Unix-like platforms, such as Open shortest path first (OSPF), routing Information Protocol (RIP), Border Gateway Protocol (BGP) and Intermediate system to Intermediate system Protocol (IS-IS).
Although Quagga implements the routing protocols of IPv4 and IPv6, it is not a complete router. A real router not only implements all routing protocols, but also has the ability to forward network traffic. Quagga only implements the routing protocol stack, while forwarding network traffic is handled by the Linux kernel.
Architecture
Quagga implements different routing protocols through daemons for specific protocols. The daemon name is the same as the routing protocol, with the letter "d" as the suffix. Zebra is the core and protocol-independent daemon that provides an abstraction layer for the kernel and provides Zserv API to Quagga clients through TCP sockets. The daemon for each specific protocol is responsible for running the relevant protocol and establishing a routing table based on the information exchanged.
Quagga architecture
Environment
This tutorial uses the OSPF protocol implemented by Quagga to configure dynamic routing. The environment includes two CentOS 7.7hosts named Alpha and Beta. The two hosts share access to the 192.168.122.0 Universe 24 network.
Host Alpha:
IP:192.168.122.100/24 Gateway: 192.168.122.1
Host Beta:
IP:192.168.122.50/24 Gateway: 192.168.122.1
Install the package
First, install the Quagga package on both hosts. It exists in the CentOS base repository:
Yum install quagga-y
Enable IP forwarding
Next, enable IP forwarding on both hosts, as it will be performed by the Linux kernel:
Sysctl-w net.ipv4.ip_forward = 1
Sysctl-p
Configuration
Now, go to the / etc/quagga directory and create a configuration file for your settings. You need three files:
Configuration file for the zebra.conf:Quagga daemon, where you can define the interface and its IP address and IP forwarding
Ospfd.conf: protocol configuration file in which you can define the network to be provided through the OSPF protocol
Daemons: where you will specify the relevant protocol daemons to run
On the host Alpha
[root@alpha] # cat / etc/quagga/zebra.conf
Interface eth0
Ip address 192.168.122.100/24
Ipv6 nd suppress-ra
Interface eth2
Ip address 10.12.13.1/24
Ipv6 nd suppress-ra
Interface lo
Ip forwarding
Line vty
[root@alpha] # cat / etc/quagga/ospfd.conf
Interface eth0
Interface eth2
Interface lo
Router ospf
Network 192.168.122.0/24 area 0.0.0.0
Network 10.12.13.0/24 area 0.0.0.0
Line vty
[root@alphaa ~] # cat / etc/quagga/daemons
Zebra=yes
Ospfd=yes
On the host Beta
[root@beta quagga] # cat zebra.conf
Interface eth0
Ip address 192.168.122.50/24
Ipv6 nd suppress-ra
Interface eth2
Ip address 10.10.10.1/24
Ipv6 nd suppress-ra
Interface lo
Ip forwarding
Line vty
[root@beta quagga] # cat ospfd.conf
Interface eth0
Interface eth2
Interface lo
Router ospf
Network 192.168.122.0/24 area 0.0.0.0
Network 10.10.10.0/24 area 0.0.0.0
Line vty
[root@beta ~] # cat / etc/quagga/daemons
Zebra=yes
Ospfd=yes
Configure the firewall
To use the OSPF protocol, you must allow it to pass through the firewall:
Firewall-cmd-- add-protocol=ospf-permanent
Firewall-cmd-reload
Now, start the zebra and ospfd daemons.
# systemctl start zebra
# systemctl start ospfd
View the routing table on both hosts with the following command:
[root@alpha ~] # ip route show
Default via 192.168.122.1 dev eth0 proto static metric 100
10.10.10.0/24 via 192.168.122.50 dev eth0 proto zebra metric 20
10.12.13.0/24 dev eth2 proto kernel scope link src 10.12.13.1
192.168.122.0/24 dev eth0 proto kernel scope link src 192.168.122.100 metric 100
You can see that the routing table on Alpha contains the routing entries from 192.168.122.50 to 10.10.10.Uniple 24, which are obtained through the protocol zebra. Similarly, on the host Beta, the table contains the route entries that reach network 10.12.13.0 take 24 through 192.168.122.100.
[root@beta ~] # ip route show
Default via 192.168.122.1 dev eth0 proto static metric 100
10.10.10.0/24 dev eth2 proto kernel scope link src 10.10.10.1
10.12.13.0/24 via 192.168.122.100 dev eth0 proto zebra metric 20
192.168.122.0/24 dev eth0 proto kernel scope link src 192.168.122.50 metric 100
What is Linux system Linux is a free-to-use and free-spread UNIX-like operating system, is a POSIX-based multi-user, multi-task, multi-threaded and multi-CPU operating system, using Linux can run major Unix tools, applications and network protocols.
On Linux system how to use open source software to create SDN to share here, I hope that the above content can make you improve. If you want to learn more knowledge, please pay more attention to the editor's updates. Thank you for following the website!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.