From owner-freebsd-mips@freebsd.org Sun Oct 25 17:39:43 2015 Return-Path: Delivered-To: freebsd-mips@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B7ED289A2 for ; Sun, 25 Oct 2015 17:39:43 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-ig0-x22e.google.com (mail-ig0-x22e.google.com [IPv6:2607:f8b0:4001:c05::22e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 861F4190D for ; Sun, 25 Oct 2015 17:39:43 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by igbkq10 with SMTP id kq10so44955351igb.0 for ; Sun, 25 Oct 2015 10:39:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=9af2ULR+JBfl24utYKL6ZdwwxCmbSF+kVfgz5KPQtpA=; b=L3JROZR37sVM+sdGCO5jQqWwndw+FYmwordTYECP9wXIecWQ5FTAB8zagpx63P9uIX pSRPPzc1/TJrynciflSWldspTndIssqpko+v9C2JKO75LdUvG9QS3Dv9rHPtdcqz7ARN UWuF5agwT3q/5hldshIOumno161ItwKB9t1Fvs0erQg0EVpskzGpLaCKTqnPE9QsY5gc avnfsc4ybGh/BW8zLSxyd75Yy47NNZ2bFQrrz8oLn4oUtxCYt4JuvnWOGXBV7GLY4r3r ZdmxPxX9cDSzxh1Nwn0UcQ7RjNfRrpS/BN0mG7DZLqmZ/lamCSYJV9RFs9ue3//KFo8K 9iWQ== MIME-Version: 1.0 X-Received: by 10.50.111.226 with SMTP id il2mr13676069igb.61.1445794782945; Sun, 25 Oct 2015 10:39:42 -0700 (PDT) Received: by 10.36.46.66 with HTTP; Sun, 25 Oct 2015 10:39:42 -0700 (PDT) In-Reply-To: <562CBEC3.8030308@rdtc.ru> References: <562CBEC3.8030308@rdtc.ru> Date: Sun, 25 Oct 2015 10:39:42 -0700 Message-ID: Subject: Re: arge1 on TL WDR3600 From: Adrian Chadd To: Eugene Grosbein Cc: "freebsd-mips@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Oct 2015 17:39:43 -0000 Hi, I'll try to answer more thoroughly tomorrow, but in the meanwhile: The AR8327 switch has two CPU ports - MAC0, and MAC6. MAC1..MAC5 are the switch ethernet ports connected to the external physical ports PHY1..PHY5. Now, normally MAC1..MAC4 are "LAN" and MAC5 is "WAN". Sometimes they disconnect PHY5 (the physical port) from MAC5 (the internal switch ethernet port) and connect PHY5 to arge1. Now, the AP135 reference board does this - arge0 -> MAC6, arge1 -> MAC0. arge0 in the AR955x SoC has extra hardware for NAT/filtering, so it's typically used as the "WAN" port. But I think (according to openwrt) arge1 isn't connected to anything; only arge0 is connected to switch MAC0. Now, you can use etherswitchcfg to configure dot1q and tag things. eg: * etherswitchcfg config vlan_mode dot1q will put it into dot1q mode Then each port has a pvid (native vlan id) and on this switch you can configure each vlan as tagged or untagged. eg: etherswitchcfg vlangroup0 vlan 1 members 6 # this just disables vlan 1 on any active port etherswitchcfg vlangroup1 vlan 2 members 0t,1,2,3,4 etherswitchcfg vlangroup2 vlan 3 members 0t,5 etherswitchcfg port1 pvid 2 etherswitchcfg port2 pvid 2 etherswitchcfg port3 pvid 2 etherswitchcfg port4 pvid 2 etherswitchcfg port5 pvid 3 This creates two VLANs - vlan2 is LAN, vlan3 is WAN, port0 (MAC0, which is hooked up to arge0) is configured as seeing vlans 2,3 as tagged; port1..4 have native vlan 2 (LAN), port 5 has native VLAN 3 (WAN). Then to configure vlans: * kldload if_vlan (and add it to the modules list in /etc/cfg/rc.conf); * ifconfig arge0.2 create vlandev arge0 vlan 2 * ifconfig arge0.3 create vlandev arge0 vlan 3 * ifconfig bridge0 deletem arge0 * ifconfig bridge0 addm arge0.2 arge0.3 (bridges the two VLANs together via bridge0, but you may not want to do this. Maybe. it's up to you!) -adrian On 25 October 2015 at 04:36, Eugene Grosbein wrote: > Hi! > > What is arge1 on TP-Link WDR3600? > All gigabit ethernet ports seem to be connected to arge0 interface by default. > And how can I manage its switch to create vlans and assign physical ports to vlans? > _______________________________________________ > freebsd-mips@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-mips > To unsubscribe, send any mail to "freebsd-mips-unsubscribe@freebsd.org"