FreeBSD, VLANy, Cisco (delsi)

Josef Brzak brzak at linux.fjfi.cvut.cz
Sun Mar 11 18:51:24 CET 2007


Ahoj,

  chtel bych Vas vsechny poprosit o radu. Mam router na FreeBSD:

  FreeBSD legolas 5.5-RELEASE-p11 FreeBSD 5.5-RELEASE-p11

  K routeru je pripojen switch Cisco 2950-12. Do switche jsou 
  pripojeny dalsi dve zarizeni (dalsi PC router a HW AP). Na routeru
  a switchy mam nastavene VLANy. Konfigurace na FreeBSD:

  do jadra jsem pridal:
  device          miibus          # MII bus support
  device          vlan            # VLAN support (needs miibus)

  pouzita sitova karta:
  em0: <Intel(R) PRO/1000 Network Connection, Version - 1.7.35>
  port 0xdc80-0xdcbf mem 0xff040000-0xff07ffff,0xff0a0000-0xff0bffff
  irq 10 at device 14.0 on pci0
  em1: <Intel(R) PRO/1000 Network Connection, Version - 1.7.35>
  port 0xdc40-0xdc7f mem 0xff000000-0xff03ffff,0xff080000-0xff09ffff
  irq 11 at device 14.1 on pci0

  nastaveni v /etc/rc.conf:
  cloned_interfaces="vlan1 vlan50 vlan100"
  ifconfig_vlan1="inet 10.94.1.1 netmask 0xffffffe0 vlan 1 vlandev em1"
  ifconfig_vlan50="inet 10.94.1.33 netmask 0xffffffe0 vlan 50 vlandev em1"
  ifconfig_vlan100="inet 192.168.100.1 netmask 0xffffff00 vlan 100 vlandev em1"
  ifconfig_em1="up"

  Do vlany50 je pripojen PC router, do vlany100 HW AP a vlan1 je management,
  kde je nastaven management switche Cisco. Nastaveni FreeBSD jsem provedl
  podle navodu na http://people.freebsd.org/~arved/vlan/vlan_en.html. 
  Zarizeni na vlane50 i vlane100 jsou dostupna a vse funguje podle toho jak
  jsem pozadoval. Jediny problem je s vlanou1. Na management switche se neni
  mozne pripojit. Switch neni dopingatelny a ani ze switche nic nedopingam.
  Zde je nastaveni Cisco switche:

  no service pad
  service timestamps debug uptime
  service timestamps log uptime
  service password-encryption
  !
  hostname cisco-sw
  !
  enable secret 5 xxxxxxxxxxxxxxxxxx
  !
  ip subnet-zero
  !
  spanning-tree mode pvst
  no spanning-tree optimize bpdu transmission
  spanning-tree extend system-id
  !
  interface FastEthernet0/1
   description PC router (local LAN)
   switchport access vlan 50
   switchport mode access
  !
  interface FastEthernet0/2
   description HW AP (Wifi)
   switchport access vlan 100
   switchport mode access
  !
  ...
  ...
  ...
  !
  interface FastEthernet0/12
   description legolas (trunk)
   switchport mode trunk
  !
  interface Vlan1
   ip address 10.94.1.28 255.255.255.224
   no ip route-cache
  !
  ip default-gateway 10.94.1.1
  ip http server
  !
  line con 0
   password 7 xxxxxxxxxxxxxxxxxx
  login
  line vty 0 4
   password 7 xxxxxxxxxxxxxxxxxx
   login
  line vty 5 15
   password 7 xxxxxxxxxxxxxxxxxx
   login
  !
  !
  end

  Jak je videt z konfigurace switche, tak na portu 1 je PC router
  (vlana 50), na portu 2 je HW AP a port 12 je nastaven jako trunk
  a je pripojen do em0 na FreeBSD routeru.

  Nekde je v te vlane1 problem nebo mam nekde chybu v konfiguraci
  (pokusil jsem se nakonfigurovat nejake zarizeni, kteremu jsem dal
  IP adresu z vlany 1. Zarizeni take nebylo dostupne). Bohuzel tu
  chybu nemohu najit, tak bych Vas chtel poprosit o radu. Predem
  Vse moc dekuji za reakci na muj dotaz.

			    Pepa Brzak






More information about the Users-l mailing list