RZ/G2L双千兆网口使用场景 BASIC模式 SWITCH模式 ROUTER模式

描述

 

RZ/G2L支持两个通道的千兆以太网口,有必要给大家介绍一下这两个千兆网口可实现的三种应用场景,方便大家有针对性地给客户的应用场景做推广。

1

 RZ/G2L SMRAC EVK双千兆网口支持信息

  Router

2

 RZ/G2L的千兆网口的技术规范

  Router

3

 两个千兆网口可以在三种使用场景下实现三种使用模式

(1)BASIC模式

基础模式最简单,也是最灵活的模式,但默认的功能比较简单,只实现了基础的网络通讯功能,需要用户自行实现报文转发,路由跳转等。VLP3.0.X中两个ethX通过connman管理。

Router

动态IP配置:

 

connmanctl config ethernet_001122334455_cable --ipv4 dhcp

 

静态IP配置:

 

connmanctl config ethernet_001122334455_cable --nameservers 8.8.8.8 4.4.4.4
connmanctl config ethernet_001122334455_cable --ipv4 manual 192.168.1.100 255.255.255.0 192.168.1.255

 

(2)SWITCH模式

想要实现SWITCH模式,首先需要在内核开启bridge功能:

 

source poky/oe-init-build-env 
MACHINE=smarc-rzg2l bitbake linux-renesas -c menuconfig
MACHINE=smarc-rzg2l bitbake linux-renesas -c compile -f
MACHINE=smarc-rzg2l bitbake linux-renesas -c deploy -f


[*] Networking support  --->
     Networking options  --->
         [*] Network packet filtering framework (Netfilter)  --->
             <*>     Bridged IP/ARP packets filtering
                   Core Netfilter Configuration  --->
                 <*> Netfilter Xtables support (required for ip_tables)
             <*>   Ethernet Bridge tables (ebtables) support  --->
                 <*>   ebt: broute table support
                 <*>   ebt: filter table support
                 <*>   ebt: nat table support
                 <*>   ebt: 802.3 filter support
                 <*>   ebt: among filter support
                 <*>   ebt: ARP filter support
                 <*>   ebt: IP filter support
                 <*>   ebt: limit match support
                 <*>   ebt: mark filter support
                 <*>   ebt: packet type filter support
                 <*>   ebt: STP filter support
                 <*>   ebt: 802.1Q VLAN filter support
                 <*>   ebt: arp reply target support
                 <*>   ebt: dnat target support
                <*>   ebt: mark target support
                <*>   ebt: redirect target support
                <*>   ebt: snat target support
                <*>   ebt: log support
        <*> 802.1d Ethernet Bridging

 

然后在VLP3.0.X中添加bridge-utils工具包到根文件系统:

 

 

vim conf/local.conf
IMAGE_INSTALL_append = " bridge-utils"
MACHINE=smarc-rzg2l bitbake core-image-qt -f

 

开机后通过以下命令配置:

 

ifconfig eth0 up
ifconfig eth1 up
ip link add name br0 type bridge
ip link set dev eth0 master br0
ip link set dev eth1 master br0
ifconfig br0 192.168.0.3 netmask 255.255.255.0

 

此时开发板的两个ethX相当于交换机的两个端口,两个端口的数据包可以自由透传。

关于RZ/G2L的双千兆网口switch性能,我们做了专门的测试,可以提供测试用例和测试报告。

(3)ROUTER模式

这是最复杂的模式,涉及到的知识点较多,ROUTER模式下的两个ethX口分别作WAN口和LAN口使用。要实现ROUTER模式需要添加相关的软件功能,VLP3.0.X默认不会添加相关的软件,如果只是想快速使用路由模式,不想了解过多的实现过程,可以使用OpenWRT,

如果希望在VLP3.0.X上实现ROUTER模式,需要添加DHCP Server、开启内核转发功能、添加iptable转发规则,如有需要可以联系瑞萨。

打开APP阅读更多精彩内容
声明:本文内容及配图由入驻作者撰写或者入驻合作网站授权转载。文章观点仅代表作者本人,不代表电子发烧友网立场。文章及其配图仅供工程师学习之用,如有内容侵权或者其他违规问题,请联系本站处理。 举报投诉

全部0条评论

快来发表一下你的评论吧 !

×
20
完善资料,
赚取积分